<template>
    <div class="content">
        <div class="bg">
            <span></span>
            <span></span>
            <span></span>
        </div>
        <div class="login">
            <h2>登录</h2>
            <div class="inputbox">
                <div class="icon">
                    <el-button link icon="Unlock"></el-button>
                </div>
                <input type="text" required />
                <label for="">邮箱</label>
            </div>
            <div class="inputbox">
                <div class="icon">
                    <el-button link icon="message"></el-button>
                </div>
                <input type="password" required />
                <label for="">密码</label>
            </div>
            <button>登录</button>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {};
    },
    mounted() {},
};
</script>

<style scoped>
@keyframes aml {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-30px);
    }
}
@keyframes am2 {
    0% {
        transform: scale(0, 0) rotateZ(60deg);
    }
    100% {
        transform: scale(1, 1) rotateZ(0);
    }
}
@keyframes am3 {
    0% {
        transform: translateY(8px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}
h2 {
    margin: 0;
}
.content {
    width: 100%;
    height: calc(100vh - 56px);
    display: grid;
    place-items: center;
    background: url(../../public/image.webp) no-repeat;
    background-position: center;
    background-size: cover;
}
.login {
    width: 400px;
    /* border: 2px solid rgba(255, 255, 255, 0.5); */
    backdrop-filter: blur(5px);
    box-shadow: inset 1px 1px 6px rgba(255, 2555, 255, 0.3), 2px 2px 15px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    box-sizing: border-box;
    padding: 60px 20px;
    animation: am3 ease-in-out 1s 0.2s backwards;
    z-index: 100;
    margin: 0 auto;
}
.bg {
    width: 400px;
    height: 400px;
    position: absolute;
    margin: 0 auto;
    animation: am2 ease-out 1s;
    z-index: 20;
}
.inputbox {
    position: relative;
    margin: 30px 0;
    border-bottom: 2px solid #fff;
}

.inputbox label {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    color: #fff;
    pointer-events: none;
    transition: 0.5s;
    /* top: -5px; */
}
input:hover ~ label,
input:focus ~ label,
input:valid ~ label {
    top: -5px;
}
.inputbox input {
    width: 100%;
    height: 50px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: #fff;
    padding: 0 35px 0 5px;
}

.icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

::v-deep .el-icon {
    color: #fff !important;
    font-size: 20px;
}

button {
    width: 100%;
    height: 50px;
    border-radius: 20px;
    border: none;
    color: #fff;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

span {
    position: absolute;
    border-radius: 50%;
    box-shadow: 1px 1px 10px #000;
    /* opacity: 0.6; */
}
span:nth-child(1) {
    animation: aml ease-in-out 3s infinite alternate;
    top: -20px;
    left: -60px;
    width: 120px;
    height: 120px;
    background: purple;
}
span:nth-child(2) {
    animation: aml ease-in-out 4s infinite alternate-reverse;
    bottom: -100px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: orange;
}
span:nth-child(3) {
    animation: aml ease-in-out 2.5s 0.5s infinite alternate;
    top: 50px;
    right: 60px;
    width: 60px;
    height: 60px;
    background: cyan;
}
</style>
